<?php
header("Content-Type: text/html;charset=utf-8");
$arr=include 'config.php';
$conn=mysqli_connect($arr['host'],$arr['user'],$arr['pwd'],$arr['db']);
if(!$conn){	//数据库链接失败
	die('fail to connect mysql:'.mysqli_connect_error());
}
mysqli_query($conn,'set names utf8');
?>